/*
 * @Author: liu wang wang
 * @Date: 2020-07-14 16:25:44
 * @LastEditTime: 2020-07-16 22:15:05
 * @LastEditors: liu wang wang
 * @Description: 数据仓库
 * @FilePath: \st-sdk-js\src\utils\store.ts
 */
class Store {
    protected state: any
    constructor() {
        this.state = {};
    }
    public getStore(key: string): any {
        return this.state[key];
    }
    public setStore(key: string, value: any): void {
        this.state[key] = value;
    }
    public clear(): void {
        const sign = this.getStore('sign');
        const signUrl = this.getStore('signUrl');
        const close = this.getStore('close');
        this.state = {};
        this.setStore('sign', sign);
        this.setStore('signUrl', signUrl);
        this.setStore('close', close);
    }
}

export default new Store();